package com.football.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author 李越
 * @since 2023-02-22
 */

@ApiModel(value = "Game对象", description = "")
@TableName("game")
@Data
public class Game implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("比赛id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("主场球队")
    private Integer homeTeam;

    @ApiModelProperty("客场球队")
    private Integer awayTeam;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("比赛时间")
    private Date gameTime;

    @ApiModelProperty("比赛场地(主场球队的球场)")
    private String gameYard;

    @ApiModelProperty("主裁判")
    private String gameReferee;

    @ApiModelProperty("轮次(第几轮)")
    private Integer gameRounds;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("所属联赛id")
    private Integer leagueId;

    @TableField(exist = false)//表示这个字段不存在于这个数据库
    private Team hometeaminfo; // 一场比赛对战的主场球队信息 （多表关联查询）

    @TableField(exist = false)
    private Team awayteaminfo; // 一场比赛对战的客场球队信息 （多表关联查询）

    @TableField(exist = false)
    private League league; // 一场比赛所属的联赛信息

    @TableField(exist = false)
    private GameData gameData;//一场比赛的详细数据

    @TableField(exist = false)
    private TeamDataSingle teamDataSingle;//球队单场数据

    @TableField(exist = false)
    private PlayerDataSingle playerDataSingle;//指定球员的球员单场数据
}
